home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_07
/
1007068a
< prev
next >
Wrap
Text File
|
1992-05-11
|
593b
|
29 lines
LISTING 1
#include <stdio.h>
#define NULL_IDX 0
typedef struct {
char value;
size_t left_child;
size_t right_child;
} Node;
static Node tree[] = {
{' ', NULL_IDX, NULL_IDX}, /* [0] */
{'*', 2, 3}, /* [1] */
{'+', 4, 5}, /* [2] */
{'-', 6, 7}, /* [3] */
{'A', NULL_IDX, NULL_IDX}, /* [4] */
{'B', NULL_IDX, NULL_IDX}, /* [5] */
{'C', NULL_IDX, NULL_IDX}, /* [6] */
{'/', 8, 9}, /* [7] */
{'D', NULL_IDX, NULL_IDX}, /* [8] */
{'E', NULL_IDX, NULL_IDX} /* [9] */
};
static size_t root = 1;